/*
 * @Author: herw
 * @Date: 2020-07-14 09:49:10
 * @Last Modified by: herw
 * @Last Modified time: 2021-01-05 09:21:43
 */
import Vue from 'vue'

import Cookies from 'js-cookie'

import 'normalize.css/normalize.css'

import Element from 'element-ui'

import dict from './components/Dict' // 数据字典

import checkPermission from '@/utils/permission' // 权限指令
import permission from './components/Permission' // 权限指令

import './assets/styles/element-variables.scss'
import './assets/styles/index.scss' // global css

import VueHighlightJS from 'vue-highlightjs' // 代码高亮
import 'highlight.js/styles/atom-one-dark.css'

import FormMaking from 'form-making'
import 'form-making/dist/FormMaking.css'

import VueEditor from 'vue2-editor'

import VueClipboard from 'vue-clipboard2'

import App from './App'
import store from './store'
import router from './router/routers'

import './assets/icons' // icon
import './router/index' // permission control
import 'echarts-gl'

// import { formatDictText } from '@/utils/dict'

Vue.use(checkPermission)
Vue.use(VueHighlightJS)
Vue.use(permission)
Vue.use(dict)
Vue.use(Element, {
  size: Cookies.get('size') || 'small' // set element-ui default size
})
Vue.use(FormMaking)
Vue.use(VueEditor)
Vue.use(VueClipboard)

Vue.config.productionTip = false
// Vue.prototype.formatDictText = formatDictText

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
